home *** CD-ROM | disk | FTP | other *** search
- Date: 9 Apr 1996 16:55:32 GMT-0400
- Path: shoestring.opus-networx.com!dnn
- Newsgroups: comp.sys.amiga.misc
- From: dnn@shoestring.opus-networx.com (Amigaboy)
- Message-ID: <8290833353303@shoestring.opus-networx.com>
- Organization: OPUS NETWORX BBS - 809-628-5023
- References: <401.6670T240T431@nibelung.demon.co.uk>
- Subject: RE: Amigados - checking f
-
-
- > What would be the format to check the existence of a file in a script for
- > dos? I would have thought something like this:
- >
- > If EXISTS blah:filename
- > dowhatever
- > else
- > dothatinstead
- > endif
- > endif
- >
- > but this doesn't work.
- >
- > Barry Shilliday -- <barry@nibelung.demon.co.uk>
- >
-
- Barry, try using 'FailAt 21' before the IF EXISTS so-so-so. If blah:filename
- was not found a non-zero return code (20) for the command would be returned
- causing your script to fail. So by setting your fail limit to more than 20
- your script would continue even if blah:filename was not found.
-
- So your script should look something like this:
-
- FailAt 21
- IF EXISTS blah:filename
- dowhatever
- ELSE
- dothatinstead
- ENDIF
-
- +----------------------------------+
- | Dwight N. Nelson |
- | amigaboy@opus-networx.com |
- +----------------------------------+
-